package com.four.user.controller;


import com.four.user.entity.Userandcity;
import com.four.user.service.IUserandcityService;
import com.guli.common.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author gs
 * @since 2021-12-23
 */
@RestController
@RequestMapping("user/userandcity")
public class UserandcityController {

    @Autowired
    private IUserandcityService userandcityService;

    /**
     * 添加用户地址
     * @param userandcity
     * @return
     */
    @PostMapping("/addUserandctiy")
    public R addUserandcity(@RequestBody Userandcity userandcity){
        userandcityService.addUserandcity(userandcity);
        return R.ok();
    }

}
